package com.njbdqn.qiy_shop.shopdao;

import java.util.List;

import org.njbdqn.commons.database.SqlTemplate;

import com.njbdqn.qiy_person.entity.Userinfos;


public class UserinDAO {
	private SqlTemplate template;
	public UserinDAO(){
		template = new SqlTemplate();
	}
	
	public List<Userinfos> login(Userinfos user){
		String sql="select * from userinfos where userphone=? and password=?";
		return template.resultToArray(sql, new Object[]{user.getUsername()
					,user.getPassword()}, Userinfos.class);
	}
}
